#ifndef USART_H
#define USART_H

#define COM_BUFSIZE 8
#define COM_SENDBUF 1024
typedef struct _COM
{
	u32 SendCnt;
	u32 ReceiveCnt;
	u8 *SendRing;
	u8 *SendFront;
	u8 *SendEnd;
	u8 SendEndFlag;
	u8 ReceiBuf[COM_BUFSIZE];
}COM;

#define SYSTEM_COM1_BANDRATE 115200

extern void PrintData(char *str,u8 lengths);
extern void Usart_Configure(void);
extern void Usart_Init(void);

extern COM Com1;
extern u8 SendBuf[COM_SENDBUF];
#endif
